<%@ page language="java" contentType="text/html; charset=UTF-8" %>
<!DOCTYPE html>
<html>
<head>
<title>客户修改</title>
<meta charset="utf-8"/>
<link rel="stylesheet" href="css/bootstrap.css"/>
	<style>
		.form-control{
			     border:0;
			     webkit-box-shadow:none;
			     box-shadow:none;
			 }

		 .form-control:focus{
			       border-color:#fff;
			      webkit-box-shadow:none;
			       box-shadow:none;
			   }
	</style>
</head>
<body>
<div class="container-fluid">

	<%@include file="header.jsp"%>

	<br><br>
	 
	<form class="form-horizontal" action="userInfo" method="post">
		<input type="hidden" name="id" value="${user.id}">
		<input type="hidden" name="username" value="${user.username}">
		<div class="form-group">
			<label  class="col-sm-1 control-label">用户名</label>
			<div class="col-sm-5">${user.username}</div>
		</div>
		<div class="form-group">
			<label for="typeName" class="col-sm-1 control-label">喜欢的商品类别</label>
			<div class="col-sm-6">
				<input type="text" class="form-control" id="typeName" name="typeName" value="${typeName}" disabled>
			</div>
		</div>

		<div class="form-group">
			<label for="orders" class="col-sm-1 control-label">最大订单金额</label>
			<div class="col-sm-6">

				<c:if test="${orders.size()!=0}">
					<input type="text" class="form-control" id="orders" name="loginIns" value="${orders[0].total}" disabled>
				</c:if>
				<c:if test="${orders.size()==0}">
					<input type="text" class="form-control" id="orders" name="loginIns" value="无购买记录" disabled>
				</c:if>
			</div>
		</div>
		<%--<div class="form-group">--%>
			<%--<label for="orders" class="col-sm-1 control-label">最大订单金额</label>--%>
			<%--<div class="col-sm-6">--%>

				<%--<c:if test="${orders!=null}">--%>
					<%--<input type="text" class="form-control" id="orders" name="orders" value="${orders[0].total}" disabled>--%>
				<%--</c:if>--%>
				<%--<c:if test="${orders==null}">--%>
					<%--<input type="text" class="form-control" id="orders" name="orders" value="无购买记录" disabled>--%>
				<%--</c:if>--%>
			<%--</div>--%>
		<%--</div>--%>
		<div class="form-group">
			<label for="orders" class="col-sm-1 control-label">最大订单购买商品</label>
			<div class="col-sm-6">

				<c:if test="${goods.size()!=0}">
					<c:forEach var="good" items="${goods}">
						<tr>
							<td><p><a href="../index/detail?goodid=${good.id}" target="_blank"><img src="${good.cover}" width="100px" height="100px"></a></p></td>
							<td><p>商品名称：${good.name}</p></td>
							<td><p>商品价格：${good.price}</p></td>
							<%--<td><p>${user.phone}</p></td>--%>
							<%--<td><p>${user.address}</p></td>--%>
						</tr>
						<%--<td><p>${good.cover}</p></td>--%>
						<%--<td><p>${good.cover}</p></td>--%>
				      </c:forEach>
					<%--<input type="text" class="form-control" id="goods" name="goods" value="${orders.total}" disabled>--%>
				</c:if>
				<c:if test="${goods.size()==0}">
					<input type="text" class="form-control" id="goods" name="goods" value="无购买记录" disabled>
				</c:if>
			</div>
		</div>

		<div class="form-group">
			<label for="loginIns" class="col-sm-1 control-label">最近登录时间</label>
			<div class="col-sm-6">
				<c:if test="${loginIns.size()==0}">
					<input type="text" class="form-control" id="loginIns" name="loginIns" value="未登录过" disabled>
				</c:if>
				<c:if test="${loginIns.size()!=0}">
					<input type="text" class="form-control" id="loginIns" name="loginIns" value="${loginIns[0].loginTime}" disabled>
				</c:if>

			</div>
		</div>
		<%--<div class="form-group">--%>
			<%--<label for="input_name" class="col-sm-1 control-label">电话</label>--%>
			<%--<div class="col-sm-6">--%>
				<%--<input type="text" class="form-control" id="input_name" name="phone" value="${user.phone}">--%>
			<%--</div>--%>
		<%--</div>--%>
		<%--<div class="form-group">--%>
			<%--<label for="input_name" class="col-sm-1 control-label">地址</label>--%>
			<%--<div class="col-sm-6">--%>
				<%--<input type="text" class="form-control" id="input_name" name="address" value="${user.address}">--%>
			<%--</div>--%>
		<%--</div>--%>
		<div class="form-group">
			<div class="col-sm-offset-1 col-sm-10">
				<button type="submit" class="btn btn-success">返回</button>
			</div>
		</div>
	</form>
	
	<span style="color:red;">${msg}</span>
	
</div>	
</body>
</html>